<?php
/**
 * Created by PhpStorm.
 * User: 李迪
 * Date: 2019/2/21
 * Time: 20:38
 */
namespace App\Http\Controllers\Homepage;

use App\Http\Controllers\BaseApiController;
use App\Services\Homepage\NewService;

class NewController extends BaseApiController
{
    private $NewService;

    public function __construct(NewService $NewService)
    {
        parent::__construct();
        $this->NewService=$NewService;
    }


    public function add(){
        //
    }

    //获取轮播图列表
    public function getList(){
        $list = $this->NewService->getAll();
        return json_encode($list);
    }
    
    //获取企业列表
    public function getCompany()
    {
        $list = $this->NewService->getCompany();
        return json_encode($list);
    }
    
    //获取热门企业
    public function getHotCompany()
    {
        $list = $this->NewService->getHotCompany();
        return json_encode($list);
    }
}